package com.fenghongzhang.day005;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.shuyu.gsyvideoplayer.GSYVideoManager;

public class Main2Activity extends AppCompatActivity {
    private MyPlayer2 myPlayer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        myPlayer = (MyPlayer2) findViewById(R.id.myPlayer);

        myPlayer.setUp(TestVideoUrl.videoUrls[2],false,"标题");
        myPlayer.startPlayLogic();

    }

    @Override
    protected void onPause() {
        super.onPause();
        GSYVideoManager.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        GSYVideoManager.onResume();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        GSYVideoManager.releaseAllVideos();
    }
}
